/**
 * Created by geyouwen on 16/9/7.
 */
function verify(obj, msg)
{
    var value = $(obj).val();
    if($.trim(value)=='')
    {
        layer.tips(msg, obj, {tips:[2, '#3595CC']});
        $(obj).focus();
        return false;
    }
    return true
}

//数据格式验证 正则
function paramsformat(param, type)
{
    var regx = new Array();
    regx['idcard']  = /^(\d{15}$|^\d{18}$|^\d{17}(\d|X|x))$/
    regx['email']  = /^(\w)+(\.\w+)*@(\w)+((\.\w+)+)$/; //邮箱验证
    regx['mobile'] = /^1[3|4|5|7|8]\d{9}$/; //移动手机验证
    regx['zip']    = /^[0-9]{6}$/; //邮编验证
    if(!regx[type].test(param)) return false;
    return true;
}